This invention relates generally to electronic writing devices and, more particularly, relates to digitizer devices and the like wherein a user moves a special pen or stylus over a surface of a sensitive tablet for creating strokes of xe2x80x9celectronic inkxe2x80x9d on a display device.
Electronic tablets and digitizer devices are well known and widely used. Typically a user holds a writing implement, such as a pen or stylus that contains electronic circuitry, and then moves a tip of the pen over a surface of an electronic tablet. An output of the tablet, which may be considered to be samples of the pen motion, is indicative of the location, in x-y tablet coordinates, of the tip of the pen. A display device can be used to map digitizer samples to display screen pixel coordinates, and to then connect these pixels by straight line segments.
However, such renderings lack sufficient visual quality. First, the line width can be undesirably thin or xe2x80x9cskinnyxe2x80x9d. Second, the lines can appear jagged, as the sample locations are typically rounded to integer pixel locations, and a sample""s position within a pixel is not accounted for.
It is also known to use higher order curves that interpolate the samples, however, in practice this technique provides little additional accuracy, and furthermore incurs a significantly higher computational cost than when using the straight line segments.
In either case, the end result is an unsatisfactory, unnatural rendering of the user""s handwriting input.
It is a first object and advantage of this invention to provide an improved method for rendering the output of a digitizer-type device.
It is a further object and advantage of the invention to render the handwriting lines with a certain width, as well as to reflect the true combination that each digitizer sample makes to a display pixel.
The foregoing and other problems are overcome and the objects of the invention are realized by methods and apparatus in accordance with embodiments of this invention.
The teachings of this invention are directed to a method for creating anti-aliased images for digitizer tablet samples that map onto the same display screen pixel.
A procedure in accordance with these teachings may be embodied as program code on a medium that is readable by a computer. The program code is used to direct operation of the computer to render lines corresponding to samples, from a digitizer tablet, that map onto a same pixel of a display screen. The program code includes a code segment for subdividing a display screen pixel into a plurality of sub-pixels; a code segment, responsive to each sample that maps onto the same display screen pixel, for mapping the sample onto a sub-pixel center; a code segment for computing a bounding box that is centered on the sample; a code segment, responsive to a size and position of the bounding box, for determining those pixels in a neighborhood of the current pixel that are overlapped by the bounding box; and a code segment for varying an intensity of the overlapped pixels according to the amount of overlap.
The code segment that determines pixels in a neighborhood of the current pixel preferably operates to store overlap-related information, for all of the samples that map onto the current pixel, within an auxiliary array. The code segment that varies the intensity then uses the contents of the auxiliary array to vary the intensity of corresponding pixel locations in a frame buffer that has an output coupled to the display screen.
The code segment that varies the intensity is responsive to a sub-pixel location of the sample, and to a precomputed summed area table (SAT), for determining an amount by which to vary the intensity.
Datapath circuitry that implements the methods of this invention is also disclosed.